import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useLoginStore = defineStore('LoginStore', () => {
  var loginUsername = ref('')
  var loginToken = ref('')
  function setTokenAndUsernaeme(token:string,username:string){
    loginToken.value = token
    loginUsername.value = username
  }
  return {setTokenAndUsernaeme,loginUsername,loginToken}
},{
  persist:{
    key:'loginStore',
    storage:localStorage
  }
})
